<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="l" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Lite - Bootstrap Skin</title>
    
    
    <!-- Favicon -->
    <link rel="shortcut icon" href="img/favicon.ico" />
    
    <!-- CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <link href="css/style.css" rel="stylesheet" />
    
    <!-- Google Fonts -->
    <link href='http://fonts.useso.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'>
    
</head>

<body bgcolor="orange">
<button id="test" style="position:fixed;right:0;bottom:0;color: blue;">回到顶部</button>
<script>
	test.onclick = function(){
	var top = document.body.scrollTop || document.documentElement.scrollTop
	scrollBy(0,-top);
}
</script>
    <!-- Start: Preloader -->
    <div id="preloader">
        <div id="loader"></div>
    </div>
    <!-- End: Preloader -->

    <!-- Start: Main Content -->
    <div class="main-container">
        
        <!-- Start: Home -->
        <section class="home-section">
            <div class="container" style="margin-top: 80px">
				<div class="row">
					<div class="col-md-12 col-sm-12 col-xs-12">
						<h1 style="color: FFFFFF">图书商城</h1>	
					</div>
				</div>
            </div>
        </section>
        <!-- End: Home -->
		
		<!-- Start: Content -->
        <section class="content-section">
            <div class="container" style="margin-top: 80px">
				<div class="row">
					<div class="col-md-12">
						<nav role="navigation" class="navbar navbar-default">	
						
							<div class="navbar-header">
								<button data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
									<span class="sr-only">Toggle navigation</span>
									<span class="icon-bar"></span>
									<span class="icon-bar"></span>
									<span class="icon-bar"></span>
								</button>
								<a href="#" class="navbar-brand"></a>
                                <a href="#" class="navbar-brand"></a>
                                <a href="#" class="navbar-brand"></a>
                                <a href="#" class="navbar-brand"></a>
							</div>							
							<div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
								<ul class="nav navbar-nav">
									<li class="active"><a href="SelectBook.do?type=all">首页</a></li>
									<li><a href="carGood.jsp">购物车</a></li>
                                    <li><a href="SelectOrderInfo.do?type=orderInfo">订单</a></li>
									<li class="dropdown">
										<a data-toggle="dropdown" class="dropdown-toggle" href="SelectMessage.do?type=all">留言空间 <b class="caret"></b></a>
										<ul role="menu" class="dropdown-menu">
											<li><a href="SelectMessage.do?type=all">全部留言</a></li>
											<li><a href="SelectMessage.do?type=my">我的留言</a></li>
											<li><a href="message_add.jsp">写留言</a></li>
										</ul>
									</li>
								</ul>
								<form role="search" class="navbar-form navbar-left" action="SelectBook.do?type=search" method="post">
									<div class="form-group">
										<input type="text" class="form-control" name="keywords">
										
									</div>
									<button class="btn btn-danger" type="submit">搜一下</button>
								</form>
								<ul class="nav navbar-nav navbar-right">
									<li><a href="login_user.jsp">登录</a></li>
                                    <li><a href="Logout.do">注销</a></li>
									
								</ul>
							</div>
						</nav>
					</div>
				</div>
			
				
				<div class="row">
				
                
					<!-- <div class="col-md-12">
						<h2 class="page-header"><span>Wells</span></h2>
					</div> -->
                   <div class="col-md-12">
				    <div class="well well-warning" style="background-color: 000000">
					<p style="font-size: 24px;">今日推荐：</p>
						<l:if test="${! empty recomList }">
	                       <l:forEach items="${recomList}" var="l" varStatus="i">
	                       		<table style="margin-left: 70px;">
	                       			<tr>
	                       				<td width="80px">排名第 ${i.count}</td>
	                       				<td width="250px" height="30">书名：${l.bname}</td>
	                       				<td width="150px" height="25">作者：${l.author}</td>
	                       				<td width="220px" height="30">出版商：${l.publisher}</td>
	                       				<td width="200px" height="30">出版时间：${l.date_publish}</td>
	                       			</tr>
	                       			
	                       		</table>
	                      	 <%-- <p style="margin-left: 70px;">${l.bname}	作者：${l.author}<br><p> --%>
	                       </l:forEach>
	                    </l:if>
						
						
					</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
							<div class="lt-gallery">
								<p class="lead text-muted">全部图书</p>
									<l:if test="${empty list }">
										<p class="lead text-muted" style="padding-left: 440px">没有找到，请重新输入关键字</p>
										
									</l:if>
	                                <l:if test="${! empty list }">
	                                    <l:forEach items="${list}" var="l">
	                                    <div class="col-md-4">
	                                        <div class="thumbnail">
	                                            <img src="picture/${l.bpicture}"  alt="Image" width="250px" height="400px">
	                                            <div class="caption">
	                                               <h3>${l.bname}</h3>
	                                               <p style="font-size: 16;color: gray;" >
	                                               <input type="hidden" name="bid" value="${l.bid}">
	                                               		作者：${l.author}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	                                                	单价:${l.cost}<br>
	                                               </p>
	                                               <button class="btn btn-warning" onclick="window.open('${pageContext.request.contextPath }/SelectBook.do?type=one&&bid=${l.bid}')">详细信息 <i class="fa fa-arrow-right"></i></button>
	                                            </div>
	                                        </div>
	                                    </div>
	                             	</l:forEach>
	                             </l:if>
							</div>
						</div>
					</div>
				
            </div>
        </section>
        <!-- End: Content -->
        
        <!-- Start: Footer-->
        <footer class="footer">
            <p>Copyright &copy; 2017.Company name All rights reserved.</p>
        </footer>
        <!-- End: Footer -->
        
    </div>
    <!-- End: Main Content -->
    
    <!-- Javascript Files -->
    <script type="text/javascript" src="js/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/jquery.pagination.js"></script>
	<script type="text/javascript" src="js/jquery.knob.min.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</body>
</html>
